package com.xtrip.util;

import java.text.SimpleDateFormat;
import java.util.Date;

import com.xtrip.common.BasicConstant;
import com.xtrip.common.BusinessConstant;

public class IdGenerator {

	public static synchronized String generateId(String prefix){
		if(prefix == null)prefix="";
		String end = new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date());
		return prefix+"0"+end;
	}
	public static String generateProvinceId(String provPinyin){
		String result = null;
		if(BusinessConstant.PROVINCE_MAP != null){
			result = BusinessConstant.PROVINCE_MAP.get(provPinyin);
		}
		return result;
	}
}
